package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: Device_Fault_RD_Analyzer
 * @Description: 78. 相关统计及维护数据信息
 * @author 高意
 * @date 2014-9-11 上午9:05:23
 * 
 */
public class Device_Fault_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String data = ackBS.substring(DATABITSTART, DATABITSTART + 18);

		result.setCodeFaultCount(Integer.parseInt(data.substring(0, 2), 16));

		result.setRfResetCount(Integer.parseInt(
				data.substring(2, 4) + data.substring(4, 6), 16));

		result.setDataResetCount(Integer.parseInt(
				data.substring(6, 8) + data.substring(8, 10), 16));

		result.setFlashResetCount(Integer.parseInt(data.substring(10, 12)
				+ data.substring(12, 14), 16));

		result.setPowerResetCount(Integer.parseInt(data.substring(14, 16), 16));

		result.setWatchDogResetCount(Integer.parseInt(data.substring(16, 18),
				16));
	}
}
